package ru.rchervot.sanasar.client.model.filters;


public class FilterItemName implements Filter {
	private String itemNameInclude;
	private String itemNameExclude;
	
	public static final String NAME = "ItemName";
	
	public FilterItemName() {
	}
	
	public FilterItemName(String itemNameInclude, String itemNameExclude) {
		this.itemNameInclude = itemNameInclude;
		this.itemNameExclude = itemNameExclude;
	}
	
	public String getItemNameInclude() {
		return itemNameInclude;
	}

	public void setItemNameInclude(String itemNameInclude) {
		this.itemNameInclude = itemNameInclude;
	}

	public String getItemNameExclude() {
		return itemNameExclude;
	}

	public void setItemNameExclude(String itemNameExclude) {
		this.itemNameExclude = itemNameExclude;
	}

	@Override
	public boolean isEmpty() {
		return (itemNameInclude == null || itemNameInclude.length() == 0) 
		&& (itemNameExclude == null || itemNameExclude.length() == 0);
	}
	
	@Override
	public String toString() {
		return "FilterItemName[itemNameInclude: " + itemNameInclude + 
		" itemNameExclude: " + itemNameExclude + "]";
	}
	
	@Override
	public String getName() {
		return NAME;
	}
}

